import Mock from 'mockjs'

const Radom = Mock.Random

export const getUserInfo = (options) => {
  const template = {
    'str|2-4': 'strs',
    'name|5': 'zxc',
    'age|+2': 25,
    email: Radom.email()
  }
  return Mock.mock(template)
}

export const login = (options) => {
  return Mock.mock({
    code: 200,
    data: {
      token: '232'
    }
  })
}

export const authorization = (options) => {
  return Mock.mock({
    code: 200,
    data: {
      token: '233'
    }
  })
}
